package io.dy.custom_pool;

import io.dy.utils.ThreadUtils;

import java.util.concurrent.TimeUnit;

/**
 * @author : dmj
 * @date: 2024/7/11 2:12 下午
 * @description:
 */
public class Main {

    public static void main(String[] args) {
        CustomThreadPool threadPool = new CustomThreadPool(2, 2, TimeUnit.SECONDS, 2,(queue,task)->{});
        for (int i = 0; i < 5; i++) {
            int j = i;
            threadPool.execute(()-> ThreadUtils.printThreadLog(j + ""));
        }

//        System.out.println(2 | 4);
//        System.out.println(4 | 8);
//
//        System.out.println(~2);

//        System.out.println(8 | 16);
//
//        System.out.println(2 & 4);
//        System.out.println(4 & 8);
//        System.out.println(8 & 16);
//
//        System.out.println(2 ^ 4);
    }
}
